/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ws1.exo2;

import com.ws1.exo2.domain.Item;
import java.util.AbstractMap;
import java.util.HashMap;
import java.util.Map;
import javax.ejb.Stateful;

/**
 *
 * @author johann
 */
@Stateful
public class ShoppingCartBean implements ShoppingCartRemote {
    private Map<Item, Integer> orderLines;
    
    public ShoppingCartBean() {
        this.orderLines = new HashMap<Item, Integer>();
    }

    @Override
    public void addItem(Item item, int quantity) {
        this.orderLines.put(item, quantity);
    }

    @Override
    public Map<Item, Integer> getOrderLines() {
        return this.orderLines;
    }

    @Override
    public void validate() {
        throw new UnsupportedOperationException("Not supported yet.");
    }
    
   
    
}
